<?php
$this->breadcrumbs=array(
	'Cafe Owner'=>array('/subscribe/cafeOwner'),
	'Update '.$model->name,
);

?>

<h1>Update CoffeeShop <?php echo $model->name; ?></h1>

<div class="rc_main">
<p><?php if($model->lockPhoto==0){
	echo CHtml::link('Manage Images',array('manageImages','id'=>$model->id));}else{
		?>Photo for this cafe is locked by admin<?php 
		
	}?></p>

<?php if(Yii::app()->user->hasFlash('coffee_update')){ ?>

<div class="flash-success">
	<?php echo Yii::app()->user->getFlash('coffee_update'); ?>
</div>
<?php } ?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	//'action'=>array('coffeeShop/update'),
	'id'=>'coffeeshop-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>
	<div class="row">
		<?php echo $form->labelEx($model,'street'); ?>
		<?php echo $form->textField($model,'street',array('size'=>60,'maxlength'=>255)); ?>
		<?php echo $form->error($model,'street'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'suburb'); ?>
		<?php echo $form->textField($model,'suburb',array('size'=>32,'maxlength'=>32)); ?>
		<?php echo $form->error($model,'suburb'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'city'); ?>
		<?php echo $form->textField($model,'city',array('size'=>32,'maxlength'=>32)); ?>
		<?php echo $form->error($model,'city'); ?>
	</div>
	

	<div class="row">
		<?php echo $form->labelEx($model,'state'); ?>
		<?php echo $form->textField($model,'state',array('size'=>32,'maxlength'=>32)); ?>
		<?php echo $form->error($model,'state'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'postcode'); ?>
		<?php echo $form->textField($model,'postcode',array('size'=>32,'maxlength'=>32)); ?>
		<?php echo $form->error($model,'postcode'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'country'); ?>
		<?php echo $form->textField($model,'country',array('size'=>32,'maxlength'=>32)); ?>
		<?php echo $form->error($model,'country'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'phone'); ?>
		<?php echo $form->textField($model,'phone',array('size'=>16,'maxlength'=>16)); ?>
		<?php echo $form->error($model,'phone'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'website'); ?>
		<?php echo $form->textField($model,'website',array('size'=>60,'maxlength'=>128)); ?>
		<?php echo $form->error($model,'website'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'email'); ?>
		<?php echo $form->textField($model,'email',array('size'=>60,'maxlength'=>255)); ?>
		<?php echo $form->error($model,'email'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'ownerName'); ?>
		<?php echo $form->textField($model,'ownerName',array('size'=>60,'maxlength'=>128)); ?>
		<?php echo $form->error($model,'ownerName'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'baristaNames'); ?>
		<?php echo $form->textField($model,'baristaNames',array('size'=>60,'maxlength'=>128)); ?>
		<?php echo $form->error($model,'baristaNames'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'coffeeBrand'); ?>
		<?php echo $form->textField($model,'coffeeBrand',array('size'=>32,'maxlength'=>32)); ?>
		<?php echo $form->error($model,'coffeeBrand'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'espressoMachine'); ?>
		<?php echo $form->textField($model,'espressoMachine',array('size'=>32,'maxlength'=>32)); ?>
		<?php echo $form->error($model,'espressoMachine'); ?>
	</div>
	<?php if($model->lockReview==0){ ?>
	<div class="row">
		<?php echo $form->labelEx($model,'review'); ?>
		<?php echo $form->textArea($model,'review',array('rows'=>6, 'cols'=>50)); ?>
		<?php echo $form->error($model,'review'); ?>
	</div>
<?php }else{?>	<div class="row">
		<p style="font-weight:bold;">Review (locked by admin)</p>
		<p><?php echo $model->review; ?></p>
	</div><?php }?>
	<div class="row">
		<?php echo $form->labelEx($model,'day1Start'); ?>
		<?php echo $form->textField($model,'day1Start'); ?>
		<?php echo $form->error($model,'day1Start'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'day1End'); ?>
		<?php echo $form->textField($model,'day1End'); ?>
		<?php echo $form->error($model,'day1End'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'day2Start'); ?>
		<?php echo $form->textField($model,'day2Start'); ?>
		<?php echo $form->error($model,'day2Start'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'day2End'); ?>
		<?php echo $form->textField($model,'day2End'); ?>
		<?php echo $form->error($model,'day2End'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'day3Start'); ?>
		<?php echo $form->textField($model,'day3Start'); ?>
		<?php echo $form->error($model,'day3Start'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'day3End'); ?>
		<?php echo $form->textField($model,'day3End'); ?>
		<?php echo $form->error($model,'day3End'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'day4Start'); ?>
		<?php echo $form->textField($model,'day4Start'); ?>
		<?php echo $form->error($model,'day4Start'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'day4End'); ?>
		<?php echo $form->textField($model,'day4End'); ?>
		<?php echo $form->error($model,'day4End'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'day5Start'); ?>
		<?php echo $form->textField($model,'day5Start'); ?>
		<?php echo $form->error($model,'day5Start'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'day5End'); ?>
		<?php echo $form->textField($model,'day5End'); ?>
		<?php echo $form->error($model,'day5End'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'day6Start'); ?>
		<?php echo $form->textField($model,'day6Start'); ?>
		<?php echo $form->error($model,'day6Start'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'day6End'); ?>
		<?php echo $form->textField($model,'day6End'); ?>
		<?php echo $form->error($model,'day6End'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'day7Start'); ?>
		<?php echo $form->textField($model,'day7Start'); ?>
		<?php echo $form->error($model,'day7Start'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'day7End'); ?>
		<?php echo $form->textField($model,'day7End'); ?>
		<?php echo $form->error($model,'day7End'); ?>
	</div>


	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->

</div>